<?php
Raise::load('core.RaiseObject');

/**
 * RaiseAccessPermissions class
 * defines the RaiseAccessPermissions class
 *
 * @author Sam-Mauris Yong / hellclanner at live dot com
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package phpraise.session.auth
 * @abstract
 * @since 1.2
 */
abstract class RaiseAccessPermissions extends RaiseObject {

    /**
     * All definition of the rules are contained in this method
     */
    public function initialize(){
        
    }

    /**
     * Check whether a user have permissions to access a specific resource
     * Parameters will be provided by RaiseApplication when checking.
     * Return TRUE if permission is given, false otherwise
     * @param mixed $user The user accessing this application
     * @param string $resource The class name of the resource (i.e. RaisePage, RaisePostback, etc.)
     * @return boolean
     */
    public abstract function check($user, $resource);

}